package com.yanqu.road.entity.activity.tonbing.data;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@FieldTypeAnnotation(tableName = "t_u_activity_tonbing_data")
public class TonBingUserData extends DataObject {

    @FieldTypeAnnotation(desc = "活动ID", select = true, update = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "玩家ID", select = true, update = true)
    private long userId;

    @FieldTypeAnnotation(desc = "膜拜时间")
    private Map<Integer,Long> worshipTimeMap = new ConcurrentHashMap<>();

    @FieldTypeAnnotation(desc = "类型,职位")
    private Map<Integer,Integer> positionMap = new ConcurrentHashMap<>();

    @FieldTypeAnnotation(desc = "阵营")
    private int campId;

    @FieldTypeAnnotation(desc = "战功")
    private long zhanGong;

    @FieldTypeAnnotation(desc = "服装兑换信息")
    private Map<Integer, Integer> skinExchangeMap = new ConcurrentHashMap<>();

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public Map<Integer, Long> getWorshipTimeMap() {
        return worshipTimeMap;
    }

    public void setWorshipTimeMap(Map<Integer, Long> worshipTimeMap) {
        this.worshipTimeMap = worshipTimeMap;
        setUpdateOption();
    }

    public Map<Integer, Integer> getPositionMap() {
        return positionMap;
    }

    public void setPositionMap(Map<Integer, Integer> positionMap) {
        this.positionMap = positionMap;
        setUpdateOption();
    }

    public int getCampId() {
        return campId;
    }

    public void setCampId(int campId) {
        if (this.campId != campId) {
            this.campId = campId;
            setOp(DataStatus.Update);
        }
    }

    public long getZhanGong() {
        return zhanGong;
    }

    public void setZhanGong(long zhanGong) {
        if (this.zhanGong != zhanGong) {
            this.zhanGong = zhanGong;
            setOp(DataStatus.Update);
        }
    }

    public Map<Integer, Integer> getSkinExchangeMap() {
        return skinExchangeMap;
    }

    public void setSkinExchangeMap(Map<Integer, Integer> skinExchangeMap) {
        this.skinExchangeMap = skinExchangeMap;
        setOp(DataStatus.Update);
    }
}
